package com.book.entity;

import static com.github.drinkjava2.jsqlbox.JAVA8.*;

import static com.github.drinkjava2.jsqlbox.SQL.*;
import static com.github.drinkjava2.jsqlbox.DB.*;
import com.github.drinkjava2.jdbpro.SqlItem;
import com.github.drinkjava2.jdialects.annotation.jdia.*;
import com.github.drinkjava2.jdialects.annotation.jpa.*;
import com.github.drinkjava2.jsqlbox.*;

import lombok.ToString;

import java.util.Date;
import java.util.Map;


@ToString
@Table(name="book_info")
public class BookInfo extends ActiveRecord<BookInfo> {

	public static final String TABLE_NAME = "book_info";

	public static final String BOOK_ID = "book_id";

	public static final String TYPE_ID = "type_id";

	public static final String BOOK_NAME = "book_name";

	public static final String BOOK_AUTHOR = "book_author";

	public static final String BOOK_TESC = "book_tesc";

	public static final String CREATE_TIME = "create_time";

	public static final String UPDATE_TIME = "update_time";



	@Id
	@Column(name="book_id")
	private Integer bookId;



	@Column(name="type_id")
	@SingleFKey(name="FK_Reference_1", refs={"book_type","type_id"})
	private Integer typeId;
	
	private BookType bookType;

	@Column(name="book_name", length=200)
	private String bookName;

	@Column(name="book_author", length=200)
	private String bookAuthor;

	@Column(name="book_tesc", length=4096)
	private String bookTesc;

	@CreateTimestamp
	@Column(name="create_time")
	private Date createTime;

	@UpdateTimestamp
	@Column(name="update_time")
	private Date updateTime;

	@Column(name="img_url", length=255)
	private String imgUrl;

	
	@Column(name="src_url1", length=255)
	private String SrcUrl1;
	
	@Column(name="dian_zan", length=255)
	private Integer dianZan;
	

	public Integer getBookId(){
		return bookId;
	}

	public BookInfo setBookId(Integer bookId){
		this.bookId=bookId;
		return this;
	}

	public Integer getTypeId(){
		return typeId;
	}

	public BookInfo setTypeId(Integer typeId){
		this.typeId=typeId;
		return this;
	}

	public String getBookName(){
		return bookName;
	}

	public BookInfo setBookName(String bookName){
		this.bookName=bookName;
		return this;
	}

	public String getBookAuthor(){
		return bookAuthor;
	}

	public BookInfo setBookAuthor(String bookAuthor){
		this.bookAuthor=bookAuthor;
		return this;
	}

	public String getBookTesc(){
		return bookTesc;
	}

	public BookInfo setBookTesc(String bookTesc){
		this.bookTesc=bookTesc;
		return this;
	}

	public Date getCreateTime(){
		return createTime;
	}

	public BookInfo setCreateTime(Date createTime){
		this.createTime=createTime;
		return this;
	}

	public Date getUpdateTime(){
		return updateTime;
	}

	public BookInfo setUpdateTime(Date updateTime){
		this.updateTime=updateTime;
		return this;
	}

	public BookType getBookType() {
		return bookType;
	}

	public void setBookType(BookType bookType) {
		this.bookType = bookType;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getSrcUrl1() {
		return SrcUrl1;
	}

	public void setSrcUrl1(String srcUrl1) {
		SrcUrl1 = srcUrl1;
	}

	public Integer getDianZan() {
		return dianZan;
	}

	public BookInfo setDianZan(Integer dianZan) {
		this.dianZan = dianZan;
		return this ; 
	}


	
	

}
